翻訳と辞書 |
indent style The rules one uses to indent code in a readable fashion. There are four major C indent styles, described below; all have the aim of making it easier for the reader to visually track the scope of control constructs. The significant variable is the placement of "{" and "}" with respect to the statement(s) they enclose and to the guard or controlling statement ("if", "else", "for", "while", or "do") on the block, if any. "K&R style" - Named after Kernighan & Ritchie, because the examples in K&R are formatted this way. Also called "kernel style" because the Unix kernel is written in it, and the "{One True Brace Style}" (abbreviation 1TBS) by its partisans. The basic indent shown here is eight spaces (or one tab) per level; four spaces are occasionally seen, but are much less common. if (cond) { }
"Allman style" - named after Eric Allman, a Berkeley hacker who wrote a lot of the BSD utilities in it (it is sometimes called "BSD st
スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース |
Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.
|
|